#ifndef SPHENIX_GEM_SD_H
#define SPHENIX_GEM_SD_H

#include <TNamed.h>
#include <vector>

#include "sPHENIX_DetectorConstruction.h"
#include "sPHENIX_GEMHit.h"

using namespace std;

class sPHENIX_GEMSD : public TNamed{
 public:
  sPHENIX_GEMSD(const char* name, sPHENIX_DetectorConstruction* detector);
  sPHENIX_GEMSD();
  virtual ~sPHENIX_GEMSD();
  
  // methods
  void     Initialize();
  Bool_t   ProcessHits();
  void     EndOfEvent();
  void     Register();
  virtual void Print(Option_t* option = "") const;

  // set methods
  void SetVerboseLevel(Int_t level);

  // get methods
  sPHENIX_GEMHit* GetHit(Int_t i) const;
  const vector<sPHENIX_GEMHit*>& GetGEMHitCollection() const {return GEMHitCollection;} ;

 private:
  // methods
  void ResetHits();

  //data members
  sPHENIX_DetectorConstruction*    Detector;           ///< Detector construction
  vector<sPHENIX_GEMHit*>          GEMHitCollection;   ///< Hits collection
  vector<sPHENIX_GEMHit*>*         GEMHitCollectionPtr;
  Int_t                            GEMVolId;           ///< GEM volume Id
  Int_t                            VerboseLevel;       ///< Verbosity level 
  Int_t                            counter;

  ClassDef(sPHENIX_GEMSD, 1);                          /// sPHENIX_GEMSD

};

/// Set verbose level
/// \param level The new verbose level value
inline void sPHENIX_GEMSD::SetVerboseLevel(Int_t level)
{ VerboseLevel = level; }

#endif // FSPHENIX_GEM_SD_H
